const express = require('express');
const router = express.Router();
const { body } = require('express-validator');
const authController = require('../controllers/authController');
const { authenticateToken } = require('../middleware/auth');
const { registerValidation, loginValidation } = require('../middleware/validation');

// form-designer 对接的登录（返回 { code, data }）
router.post('/login', loginValidation, authController.loginDesigner);

// form-designer 对接的注册（返回 { code, data }）
router.post('/register', registerValidation, authController.registerDesigner);

module.exports = router; 